/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.lojaonlinefi.ws;

import br.com.lojaonlinefi.entity.Usuario;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author Carlos
 */
@WebService(serviceName = "NewWebService")
public class NewWebService {

    @PersistenceContext
    private EntityManager em;
    
    public Usuario ping(){
        return em.find(Usuario.class,1);
    }
    
    @WebMethod(operationName = "hello")
    public String hello(@WebParam(name = "name") String txt) {
        return "Hello " + txt + " !";
    }
}
